package com.asset.account.biz;

import com.asset.account.form.AccountForm;
import com.asset.common.result.ResultMsg;

import java.math.BigDecimal;

public interface IAccountBiz {

    ResultMsg initUserAccount(AccountForm userAccountForm);

    ResultMsg update(AccountForm userAccountForm);

    AccountForm getUserAccount();

    AccountForm getByUserId(Long userId);

    /**
     * 账户金额同步
     *
     * @param userAccountId         账户Id
     * @param transactionAmount     交易金额
     * @param tradingDirectionType  交易方向
     */
    void synchronizeUserAccount(Long userAccountId, BigDecimal transactionAmount, String tradingDirectionType);

    /**
     * 账户金额回溯
     *
     * @param userAccountId
     * @param transactionAmount
     * @param tradingDirectionType
     */
    void synchronizeUserAccountReBack(Long userAccountId, BigDecimal transactionAmount, String tradingDirectionType);
}
